<extend name="Common/list-base" />
<block name="search">
    <div class="input-group">
        <span class="text-icon"> 数据名称 </span><input type="text" name="title[like]" value="{$_GET['title']['like']}">
    </div>
</block>
<block name="extra">
    <div class="tab">
    <foreach name="Think.config.DATA_GROUPS" key="k" item="v">
    <a href="{:U('index',array('groups'=>$k))}" <eq name="groups" value="$k">class="current"</eq> >{$v}</a>
    </foreach>
    </div>
</block>
<block name="action">
    <a class="btn btn-green btn-big mrt10" href="{:U('add')}">添加数据块</a>
</block>
<block name="list">
<tr>
    <th width="100">名称</th>
    <th width="100">标识</th>
    <th>数据值</th>
    <th width="50" class="tc">分组</th>
    <th width="50" class="tc">类型</th>
    <th width="200">操作</th>
</tr>
<foreach name="list" item="v">
<tr>
    <td>{$v.title}</td>
    <td>{$v.name}</td>
    <td>{:msubstr(strip_tags($v['value']),0,30)}</td>
    <td class="tc">{:int_str($v['groups'],'DATA_GROUPS')}</td>
    <td class="tc">{:int_str($v['type'],'1:文本,2:HTML,3:图标,4:图集')}</td>
    <td>
        <a class="btn mrt10 btn-blue" href="{:U('edit',array('type'=>$v['type'],'id'=>$v['id']))}">编辑数据</a>
        <a class="AjaxConfirm btn mrt10 btn-red" data-url="{:U('del?id='.$v['id'])}" href="javascript:;">删除数据</a>
    </td>
</tr>
</foreach>
</block>